# -*- coding: utf-8 -*-
'''产品模块文件'''
from google.appengine.ext import db

class Milk(db.Model):
    '''奶粉源'''
    breed = db.StringProperty(required=True)
    brand = db.StringProperty(required=True)
    stage = db.StringProperty(required=True)
    wrap = db.StringProperty(required=True)
    state = db.StringProperty(required=True, default=u'正在销售中')
    price = db.FloatProperty(required=True, default=0.0) # 平均成本
    discount = db.FloatProperty(required=True, default=1.0)
    num = db.IntegerProperty(required=True, default=0)

#class MilkBreed(db.Model):
#    '''奶粉的种类，如：牛奶，羊奶'''
#    name = db.StringProperty(required=True)
#    description = db.StringProperty(required=True)    
    
class MilkBrand(db.Model):
    '''奶粉的品牌，如：雀巢'''
    name = db.StringProperty(required=True)
    description = db.StringProperty()    

#class MilkStage(db.Model):
#    '''奶粉的阶段，如：0--6个月'''
#    name = db.StringProperty(required=True)
#    description = db.StringProperty(required=True) 

#class MilkWrap(db.Model):
#    '''奶粉的包装，如：盒装，厅装'''
#    name = db.StringProperty(required=True)
#    description = db.StringProperty(required=True)